﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using mtgtoolbox.Models;

namespace mtgtoolbox.Controls.CollectionList.ViewModels
{
  public class CollectionListCardViewModel : INotifyPropertyChanged 
  {
    public event PropertyChangedEventHandler PropertyChanged;

    protected void OnPropertyChanged(string name)
    {
      if (PropertyChanged != null)
        PropertyChanged(this, new PropertyChangedEventArgs(name));
    }

    public String Name
    {
      get { return card.Name; }
    }

    public String Set
    {
      get { return card.Set; }
    }

    public int Count
    {
      get { return card.Count; }
      set { card.Count = value; OnPropertyChanged("Count"); }
    }

    public int FoilCount
    {
      get { return card.FoilCount; }
      set { card.FoilCount = value; OnPropertyChanged("FoilCount"); }
    }

    public int SpecialCount
    {
      get { return card.SpecialCount; }
      set { card.SpecialCount = value; OnPropertyChanged("SpecialCount"); }
    }

    private Card card;
    public Card Card
    {
      get { return card; }
    }


    public CollectionListCardViewModel(Card card)
    {
      this.card = card;
    }

  }
}
